package com.tridib.config;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.data.mongodb.config.AbstractMongoConfiguration;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration;

import com.mongodb.Mongo;

@Configuration
@EnableMongoRepositories
//@ComponentScan(basePackageClasses = {MongoDBApp.class})
//@PropertySource("classpath:application.properties")
@Import(RepositoryRestMvcConfiguration.class)
@EnableAutoConfiguration
public class SpringMongoConfig3 extends AbstractMongoConfiguration
{
    @Override
    protected String getDatabaseName() {
        return "demo";
    }

    @Override
    public Mongo mongo() throws Exception {
        return new Mongo();
    }

    /*@Override
    protected String getMappingBasePackage() {
        return "com.johnathanmarksmith.mongodb.example.domain";
    }*/

}